#{extends 'CRUD/layout.html' /}
#{set title:messages.get('crud.blank.title', type.modelName) /}

<div id="crudBlank" class="${type.name}">

    <h2 id="crudBlankTitle">&{'crud.blank.title', type.modelName}</h2>
	<script type="text/javascript">
 	$(document).ready(function() {
 		$('input[id=object_file]').change(function() {
 			var path = $('input[id=object_file]').val();
 			var file = path.split('\\').pop();
 			$('input[id=object_clef]').val(file);
 		});
 		});
 	</script>
    <div class="objectForm">
    #{form action:@create(), enctype:'multipart/form-data'}
		#{crud.form}
        #{crud.custom 'clef'}
        <label for="clef">
            &{'clef'}
        </label>
        <input  id="object_clef" type="text" name="object.clef" value="" size="25"/>
        si image, ce champ est rempli automatiquement
    #{/crud.custom}
       #{/crud.form}  
            <label for="uploadFile">File</label>
        <input id="object_file" type="file" name="photo"/><br/>
        <p class="crudButtons">
            <input type="submit" name="_save" value="&{'crud.save', type.modelName}" />
            <input type="submit" name="_saveAndAddAnother" value="&{'crud.saveAndAddAnother', type.modelName}" />
        </p>
    #{/form}
    

    </div>

</div>